home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Medal Software 3
/
Gold Medal Software - Volume 3 (Gold Medal) (1994).iso
/
music
/
5mods_1.arj
/
SD001.MOD
< prev
next >
Wrap
Text File
|
1994-01-12
|
10KB
|
162 lines
Stefan Duncan #1 @2930
Mon Jan 10 21:53:10 1994
0R: net34: @2050 (via @1040) [02:15 01/12/94]
0R: net33: @1040 (via @2940) [03:39 01/12/94]
0R: net33: @2940 (via @2900) [19:54 01/11/94]
0R: net33: @2900 (via @2930) [18:16 01/11/94]
0R: net33: @2930 [21:58 01/10/94]
╒════════════════════════════════════════════════════════════════════════════╕
│ Mod Name : 1000 Random Taglines (tra-la) Mod Author: Stefan Duncan #1 │
│ WWIVnet @2930 │
│ Difficulty : █▒▒▒▒▒▒▒▒▒ Date : 10-JAN-94 │
│ │
│ WWIV Ver. : 4.23 (tested) Filename : DUNC04.MOD │
│ │
│ Description: 1000 Random taglines (* per network directory). │
│ * Includes 4 versions for separate NETWORK, DATA, GFILES, or │
│ "specific" directory searches. │
╘════════════════════════════════════════════════════════════════════════════╛
Disclaimer: I'm not planning on quitting my day-job either...
Credits: I ain't seen it. I gets the credit! <ptptptpt!> Actually, I
stripped most of the code from the random WELCOME.* file coding
in the source, so some kudos should go to Wayne. Nah, I'll keep
'em all... <grin>
This puppy looks for a RAND_TAG.0 file, and if found, will also check
for RAND_TAG.1 thru RAND_TAG.999, or until there is a break in consecutive
numbering. After that, it will add one tagline from the list at random to
your messages. If RAND_TAG.0 is not found, <subtype>.TAG, and GENERAL.TAG
files are then processed as if the mod was never installed...
*** Schtep 1: ***************************************************************
In file: MSGBASE.C, in "void inmsg(...)" find:
#ifdef OPT_MSG_TAG_ABILITY
if ((xsubs[curlsub].num_nets) && (strcmp(aux,"EMAIL")!=0)
&& (!(subboards[curlsub].anony & anony_no_tag))
&& (strcmp(strupr(irt),strupr(get_string(333)))!=0)) {
for (i=0; i<xsubs[curlsub].num_nets; i++) {
xnp=&xsubs[curlsub].nets[i];
nd=net_networks[xnp->net_num].dir;
6/* Block read your chosen mod code-block into this area. */0
6/* See the code-block variations below... */0
sprintf(s,"%s%s.TAG",nd,xnp->stype);
if (exist(s))
break;
*** Schtep 2: ***************************************************************
Recompile...
*****************************************************************************
**** Code Variations: (#1) **************************************************
**** If you would like to have separate, "network specific" taglines for ****
**** each network, block read in the following code. This code ****
**** searches the sub board's network data directory for random tagline ****
**** files. This "acts" just like the "stock" tagfile coding, searching ****
**** network directories, rather than a specific directory. ****
**** ****
sprintf(s,"%sRAND_TAG%s",nd,".0"); /* DUNC04.MOD */
if (exist(s)) { /* DUNC04.MOD */
i1=0; /* DUNC04.MOD */
sprintf(s1,"%sRAND_TAG",nd); /* DUNC04.MOD */
for (i=0;i<1000;i++) { /* DUNC04.MOD */
sprintf(s,"%s.%d",s1,i); /* DUNC04.MOD */
if (exist(s)) /* DUNC04.MOD */
i1++; /* DUNC04.MOD */
else /* DUNC04.MOD */
break; /* DUNC04.MOD */
} /* DUNC04.MOD */
sprintf(s,"%s.%d",s1,random(i1)); /* DUNC04.MOD */
break; /* DUNC04.MOD */
} /* DUNC04.MOD */
**** Code Variations: (#2) **************************************************
**** If you would like only one group of taglines, no matter how many ****
**** networks, block read in the following code. This code searches ****
**** only the default data dir, regardless of the sub board's network. ****
**** ****
sprintf(s,"%sRAND_TAG%s",syscfg.datadir,".0"); /* DUNC04.MOD */
if (exist(s)) { /* DUNC04.MOD */
i1=0; /* DUNC04.MOD */
sprintf(s1,"%sRAND_TAG",syscfg.datadir); /* DUNC04.MOD */
for (i=0;i<1000;i++) { /* DUNC04.MOD */
sprintf(s,"%s.%d",s1,i); /* DUNC04.MOD */
if (exist(s)) /* DUNC04.MOD */
i1++; /* DUNC04.MOD */
else /* DUNC04.MOD */
break; /* DUNC04.MOD */
} /* DUNC04.MOD */
sprintf(s,"%s.%d",s1,random(i1)); /* DUNC04.MOD */
break; /* DUNC04.MOD */
} /* DUNC04.MOD */
**** Code Variations: (#3) **************************************************
**** Like the code above, the following code checks the default G-Files ****
**** directory for your tagline files... ****
**** ****
sprintf(s,"%sRAND_TAG%s",syscfg.gfilesdir,".0"); /* DUNC04.MOD */
if (exist(s)) { /* DUNC04.MOD */
i1=0; /* DUNC04.MOD */
sprintf(s1,"%sRAND_TAG",syscfg.gfilesdir); /* DUNC04.MOD */
for (i=0;i<1000;i++) { /* DUNC04.MOD */
sprintf(s,"%s.%d",s1,i); /* DUNC04.MOD */
if (exist(s)) /* DUNC04.MOD */
i1++; /* DUNC04.MOD */
else /* DUNC04.MOD */
break; /* DUNC04.MOD */
} /* DUNC04.MOD */
sprintf(s,"%s.%d",s1,random(i1)); /* DUNC04.MOD */
break; /* DUNC04.MOD */
} /* DUNC04.MOD */
*** Code Variations: (#4) ***************************************************
**** If you want to place your taglines in a separate directory off of ****
**** your main directory, block read in the following code. ****
**** (This code block is untested...) ****
**** ****
sprintf(fn1,"TAGLINES\\"); /* DUNC04.MOD */
sprintf(s,"%sRAND_TAG.0",fn1); /* DUNC04.MOD */
if (exist(s)) { /* DUNC04.MOD */
i1=0; /* DUNC04.MOD */
sprintf(s1,"%sRAND_TAG",fn1); /* DUNC04.MOD */
for (i=0;i<1000;i++) { /* DUNC04.MOD */
sprintf(s,"%s.%d",s1,i); /* DUNC04.MOD */
if (exist(s)) /* DUNC04.MOD */
i1++; /* DUNC04.MOD */
else /* DUNC04.MOD */
break; /* DUNC04.MOD */
} /* DUNC04.MOD */
sprintf(s,"%s.%d",s1,random(i1)); /* DUNC04.MOD */
break; /* DUNC04.MOD */
} /* DUNC04.MOD */
*** End of Code Variations **************************************************
*****************************************************************************
This mod in no way affects the standard operation of the default tagline
additions to WWIV v4.23. Unless you have a file named RAND_TAG.0 in any of
the above mentioned directories, this code is bypassed, and the default tag-
line code is executed. The existance of both "<subtype>.TAG" and "GENERAL-
.TAG" files will be checked, and if found, are added to messages as normal.
Tagfile numbering must be sequential and unbroken in number, or the code will
break off at the first missing number and bypass all of the other tagfiles.
With this mod, RAND_TAG.0 thru RAND_TAG.999 has precedence (in whichever
directory tagfiles are placed)...
...then, <subtype>.TAG
...then, GENERAL.TAG
Personally, I recommend code-block variation #1, as it more closely
follows the rest of Wayne's stock coding for taglines (even though the ole'
DATA dir is looking kinda packed with the rest of the WWIVnet files).
3Stefan Duncan (WWIVnet #1 @2930)0